<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::resource('/admin/type','Admin\TypeController');
Route::resource('/admin/user','Admin\UserController');
Route::resource('/admin/product','Admin\ProductController');
Route::get('/login','Admin\LoginController@login');

Route::get('/userlogin','Admin\UserloginController@login');
Route::post('/dologin','Admin\UserloginController@dologin');


Route::get('/useradd','Admin\UserloginController@useradd');
Route::post('/register','Admin\UserloginController@register');

Route::post('/admin/login','Admin\LoginController@handle');
Route::get('/admin/index','Admin\LoginController@index');
Route::any('/admin/goods','Admin\GoodsController@goods');
Route::any('/admin/search','Admin\GoodsController@search');


Route::any('/addcar/{id}','Admin\CarController@addcar');
Route::any('/cars','Admin\CarController@cars');
Route::any('/cg/{id}','Admin\CarController@cg');
Route::any('/xd','Admin\CarController@xd');



Route::get('/a', function () {
    return ('welcome');
});